#include "mainwindow.h"
#include "ui_mainwindow.h"

#include <QMovie>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    //设置静态图片
    ui->movie->setPixmap(QPixmap(":/Image/Luffy.png"));
    //label允许使用动态图片
    QMovie *m = new QMovie(":/Image/mario.gif");
    ui->movie->setMovie(m);
    //播放图片
    m->start();
}

MainWindow::~MainWindow()
{
    delete ui;
}

